﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ApplicationGenerator.CommonWeb;
using ApplicationGenerator.Forms.WebControls;
using ApplicationGenerator.CommonModule;

public partial class GeneratorPages_Form : BasePage
{
    protected override void OnPreInit(EventArgs e)
    {
        base.OnPreInit(e);

        Guid formGuid = Guid.Empty;

        try
        {
            formGuid = new Guid(this.Page.Request.QueryString[QuerryStringConstants.FormGuid]);
        }
        catch (Exception ex)
        {
            throw new Exception(string.Format("Niepoprawny identyfikator listy: {0}", ex.Message));
        }

        FormWebControl webContainer = new FormWebControl(formGuid);
        this.form1.Controls.Add(webContainer);
    }
}
